Developer Documentation

QuickTime 4 API Documentation

QuickTime 4 Reference

| Previous | Chapter Contents | Chapter Top | Next |

Using the Full Screen

QuickTime 2.1 introduced two functions that you can use to put a device into full-screen mode (that is, select where and when the menu bar is not visible).

BeginFullScreen

You can use the BeginFullScreen function to begin full-screen mode for a specified monitor.

pascal OSErr BeginFullScreen (
                     Ptr *restoreState,
                     GDHandle whichGD,
                     short *desiredWidth,
                     short *desiredHeight,
                     WindowPtr *newWindow,
                     RGBColor *eraseColor,
                     long flags);
restoreState
On exit, a pointer to a block of private state data that contains information on how to return from full-screen mode. This value is passed to EndFullScreen to enable it to return the monitor to its previous state.

whichGD
A handle to the graphics device to put into full-screen mode. Set this parameter to nil to select the main screen.

desiredWidth
On entry, a pointer to a short integer that contains the desired width, in pixels, of the images to be displayed. On exit, that short integer is set to the actual number of pixels that can be displayed horizontally. Set this parameter to 0 to leave the width of the display unchanged.

desiredHeight
On entry, a pointer to a short integer that contains the desired height, in pixels, of the images to be displayed. On exit, that short integer is set to the actual number of pixels that can be displayed vertically. Set this parameter to 0 to leave the height of the display unchanged.

newWindow
On entry, a window-creation value. If this parameter is nil , no window is created for you. If this parameter has any other value, BeginFullScreen creates a new window that is large enough to fill the entire screen and returns a pointer to that window in this parameter. You should not dispose of that window yourself; instead, EndFullScreen will do so.

eraseColor
The color to use when erasing the full-screen window created by BeginFullScreen if newWindow is not nil on entry. If this parameter is nil , BeginFullScreen uses black when initially erasing the window's content area.

flags
The flags parameter specifies a set of bit flags that control certain aspects of the full-screen mode. QuickTime defines the following constants that you can use in the flags parameter:

enum {
    fullScreenHideCursor            = 1L << 0,
    fullScreenAllowEvents           = 1L << 1,
    fullScreenDontChangeMenuBar     = 1L << 2,
    fullScreenPreflightSize         = 1L << 3
};

Flag description

fullScreenHideCursor
If this flag is set, BeginFullScreen hides the cursor. This is useful if you are going to play a QuickTime movie and do not want the cursor to be visible over the movie.

fullScreenAllowEvents
If this flag is set, your application intends to allow other applications to run (by calling WaitNextEvent to grant them processing time). In this case, BeginFullScreen does not change the monitor resolution, because other applications might depend on the current resolution.

fullScreenDontChangeMenuBar
If this flag is set, BeginFullScreen does not hide the menu bar. This is useful if you want to change the resolution of the monitor but still need to allow the user to access the menu bar.

fullScreenPreflightSize
If this flag is set, BeginFullScreen doesn't change any monitor settings, but returns the actual height and width that it would use if this bit were not set. This allows applications to test for the availability of a monitor setting without having to switch to it.

DISCUSSION

The BeginFullScreen function returns, in the restoreState parameter, a pointer to a block of private state information that indicates how to return from full-screen mode. You pass that pointer as a parameter to the EndFullScreen function.

The Macintosh human interface guidelines suggest that the menu bar must always be present, and that information must always appear in windows. However, many multimedia applications have chosen to change the look and feel of the interface based on their needs. The number of details to keep track of when doing this continues to increase. To help solve this problem, QuickTime 2.1 added functions to put a graphics device into full screen mode.

EndFullScreen

You can use the EndFullScreen function to end full-screen mode for a graphics device.

pascal OSErr EndFullScreen (
                     Ptr fullState,
                     long flags);
fullState
The pointer to private state information returned by a previous call to BeginFullScreen .

flags
Reserved. Set this parameter to nil .

DISCUSSION

The EndFullScreen function restores the graphics device and other settings to the state specified by the private state information pointed to by the fullState parameter. The resulting state is that that was in effect prior to the immediately previous call to the BeginFullScreen function.


© 1999 Apple Computer, Inc.

| Previous | Chapter Contents | Chapter Top | Next |